/*
 * Copyright (c) 2010. raoqn
 */

package com.yfeng.goodjuhome.service;

import com.yfeng.exception.ServiceException;
import com.yfeng.goodjuhome.model.Product;

import java.util.List;

/**
 * www.goodjuhome.com
 * Created by IntelliJ IDEA.
 * User: rqn
 * Date: 2010-8-14
 * Time: 16:54:56
 */
public interface IProductService {

    public int addProduct(Product product) throws ServiceException;

    public int[] deleteProduct(String[] ids) throws ServiceException;

    public int updateProduct(Product product) throws ServiceException;

    /**
     * 取一个指定产品
     * @param id
     * @return
     * @throws ServiceException
     */
    public Product getProduct(String id)  throws ServiceException;

    /**
     * 查询所有产品
     * @return
     * @throws ServiceException
     */
    public List queryProductList() throws ServiceException;

    /**
     * 查询产品表
     * @param limit 查询记录数
     * @return
     * @throws ServiceException
     */
    public List queryProductList(String limit) throws ServiceException;

    /**
     * 通过类型查询
     * @param typeid
     * @return
     * @throws ServiceException
     */
    public List queryProductListByMidType(String typeid) throws ServiceException;
    public List queryProductListByMidType(String typeid,String limit) throws ServiceException;


    public List queryProductListByBigType(String typeid) throws ServiceException;
    public List queryProductListByBigType(String typeid,String limit) throws ServiceException;

    public List queryProductListByUid(String uid) throws ServiceException;
    public List queryProductListByUid(String uid,String limit) throws ServiceException;

    public boolean isExist(String name) throws ServiceException;


}
